<template>
  <a-layout-sider
    :class="['sider', isDesktop() ? null : 'shadow', theme, fixSiderbar ? 'ant-fixed-sidemenu' : null ]"
    width="256px"
    :collapsible="collapsible"
    v-model="collapsed"
    :trigger="null">
    <logo />
    <div class="child-logo">
      <img src="~@/assets/dataValidate/dataValidateLogo.png" style="width:43px;height:43px;margin-right: 10px;" alt="">
      数据质量控制系统
    </div>
    <s-menu
      :collapsed="collapsed"
      :menu="menus"
      :theme="theme"
      :mode="mode"
      @select="onSelect"
      style="padding: 16px 0px;"></s-menu>
  </a-layout-sider>

</template>

<script>
import Logo from '@/components/tools/Logo'
import SMenu from './index'
import { mixin, mixinDevice } from '@/utils/mixin'

export default {
  name: 'SideMenu',
  components: { Logo, SMenu },
  mixins: [mixin, mixinDevice],
  props: {
    mode: {
      type: String,
      required: false,
      default: 'inline'
    },
    theme: {
      type: String,
      required: false,
      default: 'dark'
    },
    collapsible: {
      type: Boolean,
      required: false,
      default: false
    },
    collapsed: {
      type: Boolean,
      required: false,
      default: false
    },
    menus: {
      type: Array,
      required: true
    }
  },
  methods: {
    onSelect (obj) {
      this.$emit('menuSelect', obj)
    }
  }
}
</script>
<style>
  .child-logo{
    text-align: left;
    padding-left: 20px;
    line-height: 64px;
    width:220px;
    height:64px;
    background:rgba(234,248,255,1);
    border-radius:0px 18px 18px 18px;
    font-size:14px;
    font-family:Microsoft YaHei;
    font-weight:bold;
    color:rgba(46,187,255,1);
    margin: auto;
    margin-top: 10px;
  }
</style>
